package server.movement;

import tools.data.output.MaplePacketLittleEndianWriter;

public class Unknown2Movement extends AbstractLifeMovement {

    private int[] unks = new int[7];


    public Unknown2Movement(int type) {
        super(type);
        for (int i = 0; i < unks.length; i++) {
            unks[i] = 0;
        }
    }

    public final void setUnk(int index, int value) {
        unks[index > unks.length ? 0 : index] = value;
    }

    @Override
    public void serialize(MaplePacketLittleEndianWriter lew) {
        lew.write(getType());
        for (int unk : unks) {
            lew.writeShort(unk);
        }
    }
}
